import request from '@/utils/request'

// 查询还款记录列表(不分页)
export function allListRecord(query) {
  return request({
    url: '/loan/record/all/list',
    method: 'get',
    params: query
  })
}

// 查询还款记录列表
export function listRecord(query) {
  return request({
    url: '/loan/record/list',
    method: 'get',
    params: query
  })
}

// 查询还款记录详细
export function getRecord(recordId) {
  return request({
    url: '/loan/record/' + recordId,
    method: 'get'
  })
}

// 新增还款记录
export function addRecord(data) {
  return request({
    url: '/loan/record',
    method: 'post',
    data: data
  })
}

// 修改还款记录
export function updateRecord(data) {
  return request({
    url: '/loan/record',
    method: 'put',
    data: data
  })
}

// 删除还款记录
export function delRecord(recordId) {
  return request({
    url: '/loan/record/' + recordId,
    method: 'delete'
  })
}
